import { Get, Post } from "@/library/utils/request"
import { ResponseWithCount } from "@/library/common/types"
import * as types from "@/views/shop_manager/shop_employee_list/types"

export const ShopEmployeeListApiUrl = {
    Select: "/ShopEmployee/Select",
    Params: "/ShopEmployee/Params",
    Insert: "/ShopEmployee/Insert",
    Update: "/ShopEmployee/Update",
    SetEnable: "/ShopEmployee/SetEmployeeEnable",
}

export const ShopEmployeeListApi = {
    /**
     * 查询 员工列表
     */
    Select(params: types.SelectParamsType) {
        return Post<ResponseWithCount<types.DataType[]>>(ShopEmployeeListApiUrl.Select, params)
    },
    /**
     * 查询 参数
    */
    Params() {
        return Get<types.ParamsType>(ShopEmployeeListApiUrl.Params)
    },
    /**
     * 新增 员工列表
     */
    Insert(params: types.InsertType) {
        return Post(ShopEmployeeListApiUrl.Insert, params)
    },
    /**
     * 更新 员工列表
     */
    Update(params: types.UpdateType) {
        return Post(ShopEmployeeListApiUrl.Update, params)
    },
    /**
     * 设置是否启用
     */
    SetEnable(params: types.SetEnableType) {
        return Post(ShopEmployeeListApiUrl.SetEnable, params)
    },
}